#include <iostream>
#include <string>
using namespace std;

class Animal {
private:
    int* num;

public:
    Animal();
    Animal(int num);
    ~Animal();
    virtual int p();
};
Animal::Animal() {
    cout << "Animal default constructor" << endl;
    this->num = new int(0);
}
Animal::Animal(int num) {
    cout << "Animal constructor" << endl;
    this->num = new int(num);
}
Animal::~Animal() {
    cout << "Animal disconstructor" << endl;
    delete num;
}
int Animal::p(){
    return 2;
}


class Cat : public Animal {
private:
    int* num1;

public:
    Cat();
    Cat(int num, int num1);
    int p() override;
    ~Cat();
};
Cat::Cat() : Animal() {
    cout << "Cat default constructor" << endl;
    this->num1 = new int(0);
}
Cat::Cat(int num, int num1) : Animal(num) {
    cout << "Cat constructor" << endl;
    this->num1 = new int(num1);
}
Cat::~Cat() {
    cout << "Cat disconstructor" << endl;
    delete num1;
}
int Cat::p(){
    return 1;
}

int main() {
    Cat c;
    return 0;
}